package STUDENT.TRINHQUANGXUANDUC.OPPS.EVENODD;

public class Models {
	public String CheckIsEvenOdd(EVObject object) {
		int i = 0;
		String chuoi = "";
		if (object.getOption() == 1) {
			while (i <= object.getValus()) {
				if (i % 2 == 0) {
					chuoi += String.valueOf(i) + ",";
				}
				i++;
			}
			do {
				if (i % 2 == 0) {
					chuoi += String.valueOf(i) + ",";
				}
				i++;
			} while (i < object.getValus());
			for (int j = 0; j < object.getValus(); j++) {
				if (j % 2 == 0) {
					chuoi += String.valueOf(j) + ",";
				}
			}
		}
		if (object.getOption() == 2) {
			while (i <= object.getValus()) {
				if (i % 2 != 0) {
					chuoi += String.valueOf(i) + ",";
				}
				i++;
			}
			do {
				if (i % 2 != 0) {
					chuoi += String.valueOf(i) + ",";
				}
				i++;
			} while (i < object.getValus());
			for (int j = 0; j < object.getValus(); j++) {
				if (j % 2 != 0) {
					chuoi += String.valueOf(j) + ",";
				}
			}
		}
		return chuoi;
	}
}
